<template>
	<view class="page-view">
		<nav-view :defaultShow="true" :title="article.article_title"></nav-view>
		<view class="page-conte" v-html="article.article_content">
			
		</view>
	</view>
</template>


<script>
	import utils from '@/common/utils.js';
	export default {
		data() {
			return {
				/*是否加载完成*/
				loadding: false,
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500,
				/*文章id*/
				article_id: 0,
				/*文章详情*/
				article: {
					image: {}
				}
			};
		},
		onLoad(e) {
			this.article_id = e.article_id;
		},
		mounted() {
			/*获取产品详情*/
			this.getData();
		},
		methods: {
			/*获取文章详情*/
			getData() {
				let self = this;
				uni.showLoading({
					title: '加载中'
				});
				self.loading = true;
				let article_id = self.article_id;
				self._get(
					'plus.article.article/detail',
					{
						article_id: article_id
					},
					function(res) {
						/*详情内容格式化*/
						res.data.detail.article_content =utils.format_content(res.data.detail.article_content);
						self.article = res.data.detail;
						self.loadding = true;
						uni.hideLoading();
					}
				);
			}
		}
	};
</script>


<style lang="scss" scoped>
	.page-conte {
		padding: 0 40rpx;
		font-size: 32rpx;
		color: #333;
		font-weight: 500;
		color: #333333;
		line-height: 67rpx;
	}
	.page-conte .title {
		
	} 
</style>